package com.demo2;

import java.util.Scanner;

/**
 * 圆形
 * @author J.L.Zhou
 *	jlzhou.top 版权所有
 */
public class Roundness extends Ellipse {

	public Roundness(){
		super("圆形");
	}



	@Override
	public void inputBaseInfo(Scanner sc) {
		System.out.println("输入"+getName()+"的半径: ");
		float temp = sc.nextFloat();
		super.setA(temp);
		super.setB(temp);
	}


	@Override
	public String getBaseInfo() {
		return String.format("半径：%.2f",getA());
	}





	public static void main(String[] args) {
		Roundness rectangle = new Roundness();
		rectangle.input(new Scanner(System.in));
		rectangle.show();
	}

}
